# Copyright (c) 2020 cgsdfc
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT

"How to format cpp code"

import subprocess

CLANG_FORMAT = 'clang-format'
CODE_STYLE = 'Google'


def FormatCodeInplace(input_file):
    try:
        subprocess.check_call(
            [CLANG_FORMAT, '-style', CODE_STYLE, '-i',
             str(input_file)])
    except FileNotFoundError as e:
        pass
